<!DOCTYPE HTML>
<html>

<head>
	<link rel="bookmark"  type="image/x-icon"  href="/img/logo_miccall.png"/>
	<link rel="shortcut icon" href="/img/logo_miccall.png">
	
			    <title>
    Ame雨
    </title>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no" />
    <link rel="stylesheet" href="/amelin-ting/css/mic_main.css" />
    <link rel="stylesheet" href="/amelin-ting/css/dropdownMenu.css" />
    <meta name="keywords" content="Ame雨" />
    
    	<script async src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script>
	 
    <noscript>
        <link rel="stylesheet" href="/amelin-ting/css/noscript.css" />
    </noscript>
    <style type="text/css">
        body:before {
          content: ' ';
          position: fixed;
          top: 0;
          background: url('/amelin-ting/img/bg.jpg') center 0 no-repeat;
          right: 0;
          bottom: 0;
          left: 0;
          background-size: cover; 
        }
    </style>

			    
  
    <script type="text/x-mathjax-config">
      MathJax.Hub.Config({
        tex2jax: {
          inlineMath: [ ['$','$'], ["\\(","\\)"]  ],
          processEscapes: true,
          skipTags: ['script', 'noscript', 'style', 'textarea', 'pre', 'code']
        }
      });
    </script>

    <script type="text/x-mathjax-config">
      MathJax.Hub.Queue(function() {
        var all = MathJax.Hub.getAllJax(), i;
        for (i=0; i < all.length; i += 1) {
          all[i].SourceElement().parentNode.className += ' has-jax';
        }
      });
    </script>
    <script async type="text/javascript" src="//cdn.bootcss.com/mathjax/2.7.1/latest.js?config=TeX-AMS-MML_HTMLorMML"></script>
  


    <script src="/amelin-ting/js/jquery.min.js"></script>
    <script src="/amelin-ting/js/jquery.scrollex.min.js"></script>
    <script src="/amelin-ting/js/jquery.scrolly.min.js"></script>
    <script src="/amelin-ting/js/skel.min.js"></script>
    <script src="/amelin-ting/js/util.js"></script>
    <script src="/amelin-ting/js/main.js"></script>
	
<meta name="generator" content="Hexo 5.4.0"></head>
    
		
<!-- Layouts -->



<!--  代码渲染  -->
<link rel="stylesheet" href="/css/prism_coy.css" />
<link rel="stylesheet" href="/css/typo.css" />
<!-- 文章页 -->
<body class="is-loading">
    <!-- Wrapper 外包 s-->
    <div id="wrapper" class="fade-in">
        <!-- Intro 头部显示 s -->
        <!-- Intro 头部显示 e -->
        <!-- Header 头部logo start -->
        <header id="header">
    <a href="/amelin-ting/" class="logo">Art Space</a>
</header>
        <!-- Nav 导航条 start -->
        <nav id="nav" class="special" >
            <ul class="menu links" >
			<!-- Homepage  主页  --> 
			<li >
	            <a href="/amelin-ting/" rel="nofollow">主页</a>
	        </li>
			<!-- categories_name  分类   --> 
	        
	        <li class="active">
	            <a href="#s1">分类</a>
	                    <ul class="submenu">
	                        <li>
	                        <a class="category-link" href="/amelin-ting/categories/Go/">Go</a></li><li><a class="category-link" href="/amelin-ting/categories/django/">django</a></li><li><a class="category-link" href="/amelin-ting/categories/drf/">drf</a></li><li><a class="category-link" href="/amelin-ting/categories/gin/">gin</a></li><li><a class="category-link" href="/amelin-ting/categories/go/">go</a></li><li><a class="category-link" href="/amelin-ting/categories/linux/">linux</a></li><li><a class="category-link" href="/amelin-ting/categories/mysql/">mysql</a></li><li><a class="category-link" href="/amelin-ting/categories/python/">python</a></li><li><a class="category-link" href="/amelin-ting/categories/%E5%86%85%E7%BD%91%E7%A9%BF%E9%80%8F/">内网穿透</a></li><li><a class="category-link" href="/amelin-ting/categories/%E5%89%8D%E7%AB%AF/">前端</a>
	                    </ul>
	        </li>
	        
	        <!-- archives  归档   --> 
	        
	        
		        <!-- Pages 自定义   -->
		        
		        <li>
		            <a href="/about/" title="简历">
		                简历
		            </a>
		        </li>
		        
		        <li>
		            <a href="/group/" title="团队">
		                团队
		            </a>
		        </li>
		        
		        <li>
		            <a href="/gallery/" title="图库">
		                图库
		            </a>
		        </li>
		        
		        <li>
		            <a href="/tag/" title="标签">
		                标签
		            </a>
		        </li>
		        


            </ul>
            <!-- icons 图标   -->
			<ul class="icons">
                    
                    <li>
                        <a title="github" href="https://github.com/miccall" target="_blank" rel="noopener">
                            <i class="icon fa fa-github"></i>
                        </a>
                    </li>
                    
                    <li>
                        <a title="500px" href="http://500px.com" target="_blank" rel="noopener">
                            <i class="icon fa fa-500px"></i>
                        </a>
                    </li>
                    
			</ul>
</nav>

        <div id="main" >
            <div class ="post_page_title_img" style="height: 25rem;background-image: url(https://img2.baidu.com/it/u=3449425845,1149421089&amp;fm=26&amp;fmt=auto);background-position: center; background-repeat:no-repeat; background-size:cover;-moz-background-size:cover;overflow:hidden;" >
                <a href="#" style="padding: 4rem 4rem 2rem 4rem ;"><h2 >计算机简单基础</h2></a>
            </div>
            <!-- Post -->
            <div class="typo" style="padding: 3rem;">
                <h1 id="计算机基础"><a href="#计算机基础" class="headerlink" title="计算机基础"></a>计算机基础</h1><h2 id="一、计算机五大组成部分"><a href="#一、计算机五大组成部分" class="headerlink" title="一、计算机五大组成部分"></a>一、计算机五大组成部分</h2><figure class="highlight python"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line"><span class="number">1.</span>控制器</span><br><span class="line"><span class="number">2.</span>运算器</span><br><span class="line"><span class="number">3.</span>存储设备</span><br><span class="line"><span class="number">4.</span>输入设备</span><br><span class="line"><span class="number">5.</span>输出设备</span><br></pre></td></tr></table></figure>

<h3 id="1-CPU详解"><a href="#1-CPU详解" class="headerlink" title="1.CPU详解"></a>1.CPU详解</h3><figure class="highlight python"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># cpu(中央处理器)</span></span><br><span class="line">    <span class="number">1.</span>  相当于人体的大脑，负责计算机的运算和控制，是服务器性能效率的最核心部件  常见品牌：intel，AMD</span><br><span class="line">    <span class="number">2.</span>  双CPU时，只能同时装同一型号的。</span><br><span class="line">    <span class="number">3.</span>  一般的企业里的服务器，cpu个数<span class="number">2</span>-<span class="number">4</span>颗，单个cpu是四核，内存总量一般是<span class="number">16</span>-<span class="number">256</span>(32G,64G)</span><br><span class="line">    <span class="number">4.</span>  做虚拟化的宿主机（eg：安装vmware（虚拟化软件）的主机）cpu颗数<span class="number">4</span>-<span class="number">8</span>颗，内存总量一般是<span class="number">48</span>-128G，<span class="number">6</span>-<span class="number">10</span>个虚拟机。</span><br><span class="line">    <span class="number">5.</span>  <span class="number">2</span>核<span class="number">4</span>线程=真<span class="number">2</span>核假<span class="number">4</span>核</span><br><span class="line">    <span class="number">6.</span>  <span class="number">4</span>核=真<span class="number">4</span>核  就是一块cpu芯片上集成<span class="number">4</span>个cpu核心</span><br></pre></td></tr></table></figure>

<h3 id="2-存储器详解"><a href="#2-存储器详解" class="headerlink" title="2.存储器详解"></a>2.存储器详解</h3><figure class="highlight python"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">#  内存：内存条相当于人脑的记忆功能，只能临时存放数据。</span></span><br><span class="line">    <span class="number">1</span>、内存里存放的电信号，断电数据则丢失，相当于人脑失意</span><br><span class="line">    <span class="number">2</span>、cpu是从内存中去除指令来运行的，运行指令产生的数据也会放入内存中，所以内存又称之为主存，因为程序运行过程中产生的数据都是先存放于内存中</span><br><span class="line"><span class="comment">#  硬盘：硬盘相当于人的本子，可以永久保存数据。</span></span><br><span class="line">    <span class="number">1</span>、磁盘里存放的是此信号，固态硬盘里存放的电子，断电数据都不会丢失，相当于人把事物记录到本子上。</span><br><span class="line">    <span class="number">2</span>、程序运行过程中产生的数据一定先是存放在内存中，若想永久保存，必须由内存刷入硬盘</span><br><span class="line">    ps：硬盘上也有缓存芯片</span><br></pre></td></tr></table></figure>

<h3 id="3-硬盘与硬盘支架"><a href="#3-硬盘与硬盘支架" class="headerlink" title="3.硬盘与硬盘支架"></a>3.硬盘与硬盘支架</h3><figure class="highlight python"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">常用的硬盘都是<span class="number">3.5</span>英寸的(sas,sata,pci-e,nvme),固态硬盘由<span class="number">2.5</span>英寸的，所以需要购买<span class="number">3.5</span>转<span class="number">2.5</span>的硬盘支架。</span><br></pre></td></tr></table></figure>

<h3 id="4-硬盘接口"><a href="#4-硬盘接口" class="headerlink" title="4.硬盘接口"></a>4.硬盘接口</h3><figure class="highlight python"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># 硬盘读写速度不仅仅是硬盘本身，还有硬盘的接口，硬盘接口有：</span></span><br><span class="line">                <span class="number">1.</span>IDE</span><br><span class="line">                <span class="number">2.</span>SATA</span><br><span class="line">                <span class="number">3.</span>SCSI</span><br><span class="line">                <span class="number">4.</span>SAS</span><br><span class="line">	<span class="number">1.</span>IDE采用的并行接口，在传输数据核信号时的总线是复用的，传输速率受到一定限制。</span><br><span class="line"><span class="comment"># 如若提高传输速率，那么传输的数据核信号往往会产生干扰，导致错误。在这种情况下，串行接口技术产生了</span></span><br><span class="line">	<span class="number">2.</span>SATA是Serial AT Attachment的缩写，及穿行ATA接口，有SATA,SATA II,SATAIII,集中标准，是将主机总线适配器连接到大容量存储设备（如硬盘驱动器，光驱核固态驱动器）的计算机总线接口</span><br><span class="line">Serial ATA采用穿行连接方式，穿行ATA总线使用嵌入式时钟信号，具备了更强的纠错能力，还具有结构简单、支持热插拔的有点。</span><br><span class="line">目前已经成了桌面硬盘的主力接口</span><br><span class="line">	<span class="number">3.</span>SCSI主要用于服务器，广泛用于小型机上的告诉数据传输技术。和现在流行的Serial ATA（SATA)硬盘相同，都是采用穿行技术以获得更高的传输速度，并通过缩短连接线改善内部空间等</span><br><span class="line">	<span class="number">4.</span>以往我们都是通过SCSI或者SATA接口及硬盘来完成数据存储工作。正因为SATA技术的飞速发展以及多方面的优势，才会让更多的人考虑能否存在一种方式可以将SATA与SCSI两者相结合，这样就可以同时发挥两者的优势，<span class="comment">#SAS应运而生</span></span><br><span class="line">	<span class="number">5.</span>光纤通道</span><br><span class="line">管线通道主要用于高端服务器场景，价格昂贵，ing问拼写是Fibre Channel，和SCSI接口一样光纤通道最初也不是为硬盘设计开发的接口技术，专门为网络系统设计的，但随着存储系统对速度的需求，才逐渐应用到硬盘系统中。</span><br><span class="line"></span><br></pre></td></tr></table></figure>

<h3 id="5-硬盘与接口组合"><a href="#5-硬盘与接口组合" class="headerlink" title="5.硬盘与接口组合"></a>5.硬盘与接口组合</h3><figure class="highlight python"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">#  硬盘接口性能</span></span><br><span class="line">	<span class="number">1.</span>硬盘：SSD(固态)&gt;机械硬盘</span><br><span class="line">	<span class="number">2.</span>硬盘接口：SAS &gt; SATA</span><br><span class="line"></span><br><span class="line"><span class="comment">#  硬盘与接口的组合玩法</span></span><br><span class="line">    <span class="number">1</span>、SSD硬盘+SAS接口=====》土豪玩法</span><br><span class="line">    <span class="number">2</span>、SSD硬盘+SATA接口====》·对速度要求比较高场景下的常规组合</span><br><span class="line">    <span class="number">3</span>、机械硬盘+SAS接口====》对速度没有特殊要求场景下的常规组合</span><br><span class="line">    <span class="number">4</span>、机械硬盘+SATA接口===》情人套餐，对速度要求较低，通常用于企业内部应用</span><br><span class="line"></span><br><span class="line"><span class="comment">#  冷热数据</span></span><br><span class="line">    据统计，高并发场景下，用户大量访问的仅仅知识那一小戳数据，比例大致为：</span><br><span class="line">    <span class="number">25</span>%的数据，用户经常访问，热数据</span><br><span class="line">    <span class="number">75</span>%的数据，用户不经常访问，冷数据</span><br><span class="line"></span><br><span class="line">    针对这<span class="number">25</span>%的核心数据，如果资金充裕，我们通常放在SSD+SAS攀上，一般常规的做法都是放在：<span class="number">15000</span>转/分机械磁盘+SAS口上，比较经济实惠</span><br><span class="line"></span><br><span class="line">    起始我们暴露给外部用户的核心的业务都是推荐使用：转速<span class="number">15000</span>转/分的机械磁盘+SAS口</span><br><span class="line">    一般内网应用或者数据备份才选择：<span class="number">7200</span>或<span class="number">10000</span>转/的机械磁盘+SATA口</span><br></pre></td></tr></table></figure>

<h2 id="二、RAID技术介绍"><a href="#二、RAID技术介绍" class="headerlink" title="二、RAID技术介绍"></a>二、RAID技术介绍</h2><figure class="highlight python"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br></pre></td><td class="code"><pre><span class="line">RAID技术的本质就是对硬盘做集群，将多块合并成为一块虚拟的大盘，可以带来好处</span><br><span class="line">    <span class="number">1.</span>容量的增大</span><br><span class="line">    <span class="number">2.</span>读写速度提升</span><br><span class="line">    <span class="number">3.</span>防止单点故障</span><br><span class="line"></span><br><span class="line">RAID有多种整合方式，常见的有：</span><br><span class="line">    <span class="number">1</span>、raid <span class="number">0</span></span><br><span class="line">    <span class="number">2</span>、raid <span class="number">1</span></span><br><span class="line">    <span class="number">3</span>、raid <span class="number">5</span></span><br><span class="line">    <span class="number">4</span>、raid <span class="number">10</span></span><br><span class="line"></span><br><span class="line"><span class="comment">#  raid 0 ：又称为Stripe（条带化）或Striping（条带模式），它在所有RAID级别中具有最高的存储性能（磁盘容量不浪费，读写很快）。</span></span><br><span class="line">  RAID <span class="number">0</span> 提高存储性能的原理是吧连续的数据分散到多个磁盘上存取，这样，系统有数据请求就可以被多个磁盘并行的执行，每个磁盘执行属于它自己的那部数据请求，这种数据上的并行操作可以充分利用总线的带宽，显著提高磁盘整体存取性能。</span><br><span class="line"><span class="comment">#  适合大规模并发读写，但对数据安全性要求不高的情况，如mysql（数据块从库），集群的节点RS（服务）</span></span><br><span class="line"></span><br><span class="line"><span class="comment"># raid 1 ：又称为Mirror或Mirrooting（镜像），它的宗旨是最大限度的保证用户数据的可用性和可修复性，raid 1 的操作方式是吧用户写入硬盘的数据百分之百的自动复制到另外一个硬盘上，从而实现存储双份的数据</span></span><br><span class="line"></span><br><span class="line">要制作RAID <span class="number">1</span>，只支持两块盘，整个RAID大小等于两个磁盘中最小的那块的容量，因此，最好使用同样大小的磁盘，在存储时同时写入两块磁盘，实现数据完整备份，但相对降低了写入性能，但是读取数据时可以并发，想打渔两块RAID的读取效率。</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="comment">#  raid 5 是一种存储性能，数据安全和存储成本兼顾的存储解决方案。</span></span><br><span class="line">raid <span class="number">5</span> 需要三款或以上的物理磁盘，可以提供热备盘实现故障恢复，采用奇偶效验，可以靠性强，只有同时损坏<span class="number">2</span>块盘时数据才会损坏，之损坏一块盘时，系统会根据存储的奇偶校验位重建数据，临时提供服务，此时如果有热备盘，系统还会自动在热备盘上重建故障磁盘上的数据。</span><br><span class="line"><span class="comment">#  raid 5可以理解为时raid 0 和raid 1的折中方案，适合对性能和冗余都有一定要求，又都不是十分高的情况，mysql的主从库都可以，存储也可以，普通的服务器为了减少维护成本，又保持一定冗余和读性能都可以一做raid 5</span></span><br><span class="line"></span><br><span class="line"><span class="comment"># raid 10  极高的读写效率和较高的数据保护、恢复能力</span></span><br><span class="line">raid <span class="number">1</span>+<span class="number">0</span>也被称为raid10标准，实际是将raid <span class="number">1</span>和raid <span class="number">0</span>标准结合的产物，在连续地以位或字节为单位分割数据并且并行读//写多个磁盘的同时，为每一块磁盘做磁盘镜像进行冗余。它的有点是同时拥有raid <span class="number">0</span>炒饭速度和raid <span class="number">1</span>的数据可靠性，但是cpu占用率同样也高，而且磁盘的利用率比较低。</span><br><span class="line"><span class="comment">#  raid 10 适用于数据库存储服务器等需要高性能，高容错，但对容量要求不大的场合</span></span><br><span class="line"></span><br><span class="line">在盘数形同的情况下各种raid对比：</span><br><span class="line"><span class="comment">#冗余从好到坏：1、10、5、0</span></span><br><span class="line"><span class="comment">#读写性能从好到坏：0、1、5、1</span></span><br><span class="line"><span class="comment">#成本从低到高：0、5、1、10</span></span><br><span class="line"></span><br><span class="line">不同raid级别的企业应用举例，根据数据的存储和访问的需求，去匹配对应的raid级别</span><br><span class="line"><span class="comment">#单台服务器，很重要，盘不多，系统盘raid 1</span></span><br><span class="line"><span class="comment">#数据库/存储服务器，主库raid 10，从库raid 5 /raid 0（为了维护成本，raid 10）</span></span><br><span class="line"><span class="comment">#web服务器，如果没有太多数据的话，raid 5 raid 0（单盘）</span></span><br><span class="line"><span class="comment">#有多台，监控/应用服务器， raid 5 raid 0</span></span><br><span class="line"></span><br></pre></td></tr></table></figure>

<h2 id="三、多道技术"><a href="#三、多道技术" class="headerlink" title="三、多道技术"></a>三、多道技术</h2><figure class="highlight python"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line">空间上的复用  空间是指内存空间上的复用</span><br><span class="line">时间上的复用  时间是指cpu时间上的复用---------将cpu时间切片来使程序员错误的认为就是一直在处理他的事</span><br><span class="line"><span class="comment">#  多道程序设计是在计算机内存中同时存放几道相互独立的程序，使它们在管理程序控制之下，相互穿插的运行。 两个或两个以上程序在计算机系统中同处于开始到结束之间的状态。这就称为多道程序设计。</span></span><br><span class="line"></span><br></pre></td></tr></table></figure>



<h2 id="四、主板"><a href="#四、主板" class="headerlink" title="四、主板"></a>四、主板</h2><figure class="highlight python"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br></pre></td><td class="code"><pre><span class="line">所有的硬件设备及接口都会被集成在一块电路板上，这块板子称之为主板</span><br><span class="line">    <span class="number">1.</span>主板和cpu都是电脑中最关键的部件，</span><br><span class="line">    <span class="number">2.</span>所有的板卡都必须通过主板发挥作用，主板性能和质量的好坏直接影响到整个系统</span><br><span class="line">    <span class="number">3.</span>电脑主板按不同的架构标准和各种不同的主要部件，接口组合而成</span><br><span class="line"></span><br><span class="line"><span class="number">4.2</span>主板芯片组：</span><br><span class="line">	主板芯片组是主板上 最重要的部件，主板的功能主要取决于芯片组，芯片组负责管理cpu和内存，各种总线扩展以及外设的支持。</span><br><span class="line"><span class="number">4.3</span> BIOS芯片：</span><br><span class="line">    BIOS（basic <span class="built_in">input</span> output system）芯片（CMOS芯片）：负责主板通电后各部件自检，设置，保存，一切正常后才能启动操作系统。记录了电脑最基本的信息，是廉与硬件打交道的最基础的桥梁，没有它电脑就不能工作</span><br><span class="line">    常见的三种BIOS： Award、AMI、Phoenix</span><br></pre></td></tr></table></figure>

<h2 id="五、主板电源"><a href="#五、主板电源" class="headerlink" title="五、主板电源"></a>五、主板电源</h2><figure class="highlight python"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line"><span class="number">1.</span>服务器双电源模块</span><br><span class="line"><span class="number">2.</span>电源模块的连接线街道不同的插线板上</span><br><span class="line"><span class="number">3.</span>UPS（不间断电源）相当于一个蓄电池，可以在突然断电的情况下，为电话供电一段时间，一般个人pc的ups可以撑<span class="number">5</span>-<span class="number">20</span>分钟，服务器ups可以撑几个小时，可以为运维人员腾出时间来解决电的问题。</span><br><span class="line"><span class="number">4.</span>生产中一般单个服务器核心业务最好使用双电源AB线路，（由IDC机房提供双路电源，双路电源街道不同的市电电源）。如果集群的情况可以不用双电源</span><br><span class="line"><span class="number">5.</span>点背的话，双路电源全停，ups为服务器虚名，续到一定时间ups也块没电了，通常机房会有小型柴油发电机来应急，一般机场回合附近的加油站签订紧急供油协议。</span><br></pre></td></tr></table></figure>

<h2 id="六、风扇组"><a href="#六、风扇组" class="headerlink" title="六、风扇组"></a>六、风扇组</h2><figure class="highlight python"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># 功能:  为cpu降温</span></span><br><span class="line"><span class="comment"># 作用： 如果一开机cpu温度很高，时间长了搞不好就是一缕黑烟，cpu就坏了，选一个好的风扇十分重要</span></span><br></pre></td></tr></table></figure>

<h2 id="七、服务器分类"><a href="#七、服务器分类" class="headerlink" title="七、服务器分类"></a>七、服务器分类</h2><figure class="highlight python"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br></pre></td><td class="code"><pre><span class="line"><span class="number">1.</span>按尺寸分类：   1U=<span class="number">1.75</span>英寸=<span class="number">4.45</span>cm</span><br><span class="line">    1U  2U  3U 4U</span><br><span class="line"><span class="number">2.</span>按外形分类：</span><br><span class="line">    <span class="number">2.1</span>  机架</span><br><span class="line">    <span class="number">2.2</span>  刀片</span><br><span class="line">    <span class="number">2.3</span>  塔式</span><br><span class="line"><span class="number">3.</span>服务器品牌</span><br><span class="line"></span><br><span class="line"><span class="comment"># 常识性：pc端，服务器</span></span><br><span class="line"></span><br><span class="line"><span class="comment"># 按照外形分：</span></span><br><span class="line"><span class="number">1.</span>机架式服务器</span><br><span class="line">	机架式服务器的外形看起来不像计算机，而像抽屉，由1u，2u，4u等规格，机架式服务器安装在标准的<span class="number">19</span>英寸机柜里面，这种结构的多为功能性服务器。</span><br><span class="line"><span class="number">2.</span>刀片式服务器：</span><br><span class="line">	是指在标准高度的机架式迹象内可插装多个卡式的服务器单元，实现高可用和高密度。每一块刀片实际上就是一块系统主板。他们可以通过<span class="string">&#x27;板载&#x27;</span>硬盘启动自己的操作系统，如windows NT/<span class="number">2000</span>、Linux等，类似于一个独立的服务器，在这种模式下，每一块模板运行自己的系统，服务于指定的不同用户群，相互之间没有关联，因此相较于机架式服务器和机柜式服务器，单片模板的性能较低。不过，管理员可以使用系统软件将这些模板集合成一个服务器集群。在集群中插入薪的刀片，就可以提高整体性能。而由于每块刀片都是热插拔，所以，系统可以轻松进行替换，并且将维护时间减少到最小。</span><br></pre></td></tr></table></figure>

<h2 id="八、服务器品牌"><a href="#八、服务器品牌" class="headerlink" title="八、服务器品牌"></a>八、服务器品牌</h2><figure class="highlight python"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br></pre></td><td class="code"><pre><span class="line">常见的品牌有：</span><br><span class="line"><span class="number">1.</span>dell   性价比高</span><br><span class="line"><span class="number">2.</span>IBM    高端，比较贵</span><br><span class="line"></span><br><span class="line"><span class="number">2010</span>年以前：  </span><br><span class="line">1U： <span class="number">1850</span>      <span class="number">1950</span></span><br><span class="line">2U： <span class="number">2850</span>      <span class="number">2950</span></span><br><span class="line"><span class="number">2004</span>-<span class="number">2013</span>年：</span><br><span class="line">1U: R410 , R610</span><br><span class="line">2U: R710</span><br><span class="line"><span class="number">2014</span>-至今</span><br><span class="line">1U: R420/<span class="number">430</span>   R620/<span class="number">630</span></span><br><span class="line">2U: R720/<span class="number">730</span>/<span class="number">740</span></span><br></pre></td></tr></table></figure>

<h2 id="九、去IOE运动"><a href="#九、去IOE运动" class="headerlink" title="九、去IOE运动"></a>九、去IOE运动</h2><figure class="highlight python"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">IBM:           服务器-----dell服务器、云主机</span><br><span class="line">甲骨文Oracle ： 数据库管理软件------mysql（marriadb）</span><br><span class="line">EMC：          存储-----自定义存在，ceph块存储，nfs文件存储</span><br></pre></td></tr></table></figure>

<h2 id="十、远程管理卡"><a href="#十、远程管理卡" class="headerlink" title="十、远程管理卡"></a>十、远程管理卡</h2><figure class="highlight python"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br></pre></td><td class="code"><pre><span class="line">IDRAC远程控制卡作用有二：</span><br><span class="line">    <span class="number">1.</span>开关服务器</span><br><span class="line">    <span class="number">2.</span>查看服务器开关的过程等信息</span><br><span class="line">详细介绍：</span><br><span class="line">	<span class="number">1.</span>IDRAC卡相当于附加在服务器上的一台独立运行的小型pc，通过与服务器主板上的管理芯片BMC进行通信，监控与管理服务器的硬件状态信息，它拥有自己的系统和IP地址，与服务器上的os无关，是服务器管理员进行远程访问的管理的便利工具。</span><br><span class="line">	<span class="number">2.</span>IDRAC分型Express和Enterprice两种版本，IDRAC默认是用服务器 <span class="number">1</span> 号网口来连接，IDRAC Enterprice默认使用专用网口连接。R630.R730.R830.R930默认均使用专用网口进行连接</span><br><span class="line">	<span class="number">3.</span>远程管理卡有服务器自带的，也有独立的。服务器自带的远程管理卡，一般只可以关机、开机，但是看不到开关的显示过程。所以，最好选择独立的远程管理卡，大概<span class="number">200</span>块。大客户有KVM远程管理，特大客户会有自己的人员驻扎机房。</span><br><span class="line"></span><br></pre></td></tr></table></figure>

<h1 id="计算机体系三层结构与优化"><a href="#计算机体系三层结构与优化" class="headerlink" title="计算机体系三层结构与优化"></a>计算机体系三层结构与优化</h1><h2 id="一、三大核心硬件"><a href="#一、三大核心硬件" class="headerlink" title="一、三大核心硬件"></a>一、三大核心硬件</h2><figure class="highlight python"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br></pre></td><td class="code"><pre><span class="line">与运行程序有关的三大核心硬件为：</span><br><span class="line">    <span class="number">1.</span>cpu</span><br><span class="line">    <span class="number">2.</span>内存</span><br><span class="line">    <span class="number">3.</span>硬盘</span><br><span class="line">程序的运行与三单核心硬件的关系</span><br><span class="line">	<span class="number">1.</span>程序最先存放与硬盘中，程序的运行会先把程序相关内容从硬盘读入内存==》称之为程序的加载或启动</span><br><span class="line">	<span class="number">2.</span>然后cpu从内存中读取指令来运行》》称之为程序的运行过程</span><br><span class="line"><span class="comment"># 所以，若想加快程序的启动速度，应该换一块好的硬盘+接口</span></span><br><span class="line"><span class="comment"># 若想能同时运行的程序数比较多，应该加内存</span></span><br></pre></td></tr></table></figure>

<h2 id="二、三层结构"><a href="#二、三层结构" class="headerlink" title="二、三层结构"></a>二、三层结构</h2><figure class="highlight python"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line"><span class="number">1.</span>应用程序</span><br><span class="line"><span class="number">2.</span>操作系统</span><br><span class="line"><span class="number">3.</span>计算机硬件（cpu，内存，硬盘）</span><br></pre></td></tr></table></figure>

<h2 id="三、优化思想"><a href="#三、优化思想" class="headerlink" title="三、优化思想"></a>三、优化思想</h2><figure class="highlight python"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br></pre></td><td class="code"><pre><span class="line">应用程序可分为两类：</span><br><span class="line">    <span class="number">1.</span>计算机密集型</span><br><span class="line">    <span class="number">2.</span>IO密集型</span><br><span class="line">针对计算机密集型程序，例如科学运算软件、金融类如比特币挖矿 ：  <span class="comment">#  优化思路无它们就是针对cpu的优化</span></span><br><span class="line"></span><br><span class="line">我们通常的应用程序都是IO密集型，因为我们日常的廉大多数都离不开网络，网络IO比本地硬盘还慢，是典型的IO密集型软件</span><br><span class="line">本地优化思路：</span><br><span class="line">    <span class="number">1.</span>针对读数据操作，能从内存读就不要从硬盘读，可以将数据事先读入内存</span><br><span class="line">    <span class="number">2.</span>针对写数据操作，现在内存中攒一大波数据，然后在一次性刷入硬盘</span><br><span class="line">架构层面优化思路：</span><br><span class="line">	<span class="number">1.</span>在mysql前面当一个redis内存数据库，优先从redis中读取数据</span><br><span class="line"></span><br><span class="line">了解上述思想后，具体动手操作，我们应该围绕下述四个层次</span><br><span class="line">    <span class="number">1.</span>硬件优化=》缓存，集群</span><br><span class="line">    <span class="number">2.</span>操作系统内核优化</span><br><span class="line">    <span class="number">3.</span>应用程序优化</span><br><span class="line">    <span class="number">4.</span>网络优化</span><br></pre></td></tr></table></figure>

<h2 id="四、buffrt与cache"><a href="#四、buffrt与cache" class="headerlink" title="四、buffrt与cache"></a>四、buffrt与cache</h2><figure class="highlight python"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line">大家都说linux系统效率高，到底高在哪里，其中一个方面就是buffrt与cache的设计</span><br><span class="line">linux系统觉得我们日常内存都不会用满，所以它自作主张，会从空闲的内存中节奏一部分内存，一部分用作buffer，一部分用作cache</span><br><span class="line"><span class="comment"># buffrt称之为缓冲区：linux系统会将要写入硬盘的数据先缓冲到buffer，然后一次性刷入硬盘，以此减少IO次数。</span></span><br><span class="line"><span class="comment"># cache称之为高速缓存：linux系统会将硬盘读入内存的数据缓存到cache里，下次读的时候直接从cache取即可</span></span><br><span class="line"></span><br><span class="line"><span class="comment">#  cache空间可以随便清理，而buffer空间在清理前最好x制性刷新命令</span></span><br></pre></td></tr></table></figure>


            </div>

            <!-- Post Comments -->
            
    <!-- 使用 DISQUS_CLICK -->
<div id="disqus-comment">
    <div id="disqus_thread"></div>

<!-- add animation -->
<style>
	.disqus_click_btn {
            line-height: 30px;
            margin: 0;
            min-width: 50px;
            padding: 0 14px;
            display: inline-block;
            font-family: "Roboto", "Helvetica", "Arial", sans-serif;
            font-size: 14px;
            font-weight: 400;
            text-transform: uppercase;
            letter-spacing: 0;
            overflow: hidden;
            will-change: box-shadow;
            transition: box-shadow .2s cubic-bezier(.4, 0, 1, 1), background-color .2s cubic-bezier(.4, 0, .2, 1), color .2s cubic-bezier(.4, 0, .2, 1);
            outline: 0;
            cursor: pointer;
            text-decoration: none;
            text-align: center;
            vertical-align: middle;
            border: 0;
            background: rgba(158, 158, 158, .2);
            box-shadow: 0 2px 2px 0 rgba(0, 0, 0, .14), 0 3px 1px -2px rgba(0, 0, 0, .2), 0 1px 5px 0 rgba(0, 0, 0, .12);
            color: #fff;
            background-color: #7EC0EE;
            text-shadow: 0
        }
</style>
	
<div class="btn_click_load" id="disqus_bt"> 
    <button class="disqus_click_btn">点击查看评论</button>
</div>

<!--
<script type="text/javascript">
$('.btn_click_load').click(function() {
    /* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
    var disqus_shortname = 'http-miccall-tech'; // required: replace example with your forum shortname

    /* * * DON'T EDIT BELOW THIS LINE * * */
    (function() {
      var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
      dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
      (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
    })();

    document.getElementById('disqus_bt').style.display = "none";
});
</script>
-->
<script type="text/javascript">
    var disqus_config = function () {
        this.page.url = 'https://gitee.com/AmeX/amelin-ting.git/2017/03/30/%E8%AE%A1%E7%AE%97%E6%9C%BA%E5%9F%BA%E7%A1%80/';  // Replace PAGE_URL with your page's canonical URL variable
        this.page.identifier = 'https://gitee.com/AmeX/amelin-ting.git/2017/03/30/%E8%AE%A1%E7%AE%97%E6%9C%BA%E5%9F%BA%E7%A1%80/'; // Replace PAGE_IDENTIFIER with your page's unique identifier variable
    };
</script>

<script type="text/javascript">
    $('.btn_click_load').click(function() {  //click to load comments
        (function() { // DON'T EDIT BELOW THIS LINE
            var d = document;
            var s = d.createElement('script');
            s.src = '//http-miccall-tech.disqus.com/embed.js';
            s.setAttribute('data-timestamp', + new Date());
            (d.head || d.body).appendChild(s);
        })();
        $('.btn_click_load').css('display','none');
    });
</script>
</div>
<style>
    #disqus-comment{
        background-color: #eee;
        padding: 2pc;
    }
</style>


        </div>
        <!-- Copyright 版权 start -->
                <div id="copyright">
            <ul>
                <li>&copy;Powered By <a target="_blank" rel="noopener" href="https://hexo.io/zh-cn/" style="border-bottom: none;">hexo</a></li>
                <li>Design: <a target="_blank" rel="noopener" href="http://miccall.tech " style="border-bottom: none;">miccall</a></li>
            </ul>
            
                <span id="busuanzi_container_site_pv">本站总访问量<span id="busuanzi_value_site_pv"></span>次</span>
			
        </div>
    </div>
</body>



 	
</html>
